package com.ssy.lingxi.purchase.model.enums;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 *  直送客户/客户自提枚举
 * @author 万宁
 * @version 2.0.0
 * @date 2021-05-25
 */
public enum DeliveryTypeEnum {

    /**
     * 直送客户/客户自提:
     *   1、直送客户
     *   2、客户自提
     */

    /**
     * 1: 直送客户
     */
    DIRECT_DELIVERY_TO_CUSTOMERS(1, "直送客户"),

    /**
     * 2: 客户自提
     */
    CUSTOMER_SEL_DELIVERY(2, "客户自提");

    DeliveryTypeEnum(Integer code, String msg) {
        this.code = code;
    }

    private final Integer code;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return LanguageHolder.getName(this.getClass(), this.getCode());
    }

    public static String getCodeMsg(Integer code) {
        return LanguageHolder.getName(DeliveryTypeEnum.class, code);
    }
}
